package com.angel.mapper;

import com.angel.bean.dto.SocketEmployeeDto;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import com.angel.bean.Employee;

@Mapper
public interface EmployeeDao {
    int insert(@Param("employee") Employee employee);

    int insertSelective(@Param("employee") Employee employee);

    int insertList(@Param("employees") List<Employee> employees);

    int update(@Param("employee") Employee employee);

    int delete(@Param("employee") Employee employee);

    List<Employee> findEmployee(@Param("employee") Employee employee);

    // 模糊查询 vagueQuery
    List<Employee> searchEmployee(@Param("employee") Employee employee);

    /***
     * 从定义分页查询的查询方法
     * @param employee 员工的查询条件
     * @return 返回分页封装后的员工查询
     */
    Page<Employee> findAllEmployeeByPage(@Param("employee") Employee employee);

    SocketEmployeeDto findEmployeeAndType(@Param("employee") Employee employee);
}
